home *** CD-ROM | disk | FTP | other *** search
- /* EasyCODE(C++) V5.1 01.03.1995 08:24:59
- Program for paying an invoice */
- /* EasyCODE O
- If=horizontal
- LevelNumbers=no
- LineNumbers=no
- ScreenFont=MS Sans Serif,,80,9217,-13,0,400,0,0,0,0,0,0,1,2,1,34
- PrinterFont=Courier,,100,2,-42,0,400,0,0,0,0,0,0,2,1,2,49
- LastLevelId=4 */
-
- /* EasyCODE ( 2
- Program for paying an invoice */
- #include <stdio.h>
- extern int amount();
- extern void writecheques();
-
- /* EasyCODE F */
- void main()
- {
- int amountofinvoice;
- int cash = 0;
- int maximum = 2500;
- int numberofcheques;
- int remainingvalue;
- if ((amountofinvoice=amount()) <= cash)
- {
- printf ("\nCash payment !");
- }
- else
- {
- numberofcheques = amountofinvoice/maximum;
- remainingvalue = amountofinvoice%maximum;
- while (numberofcheques != 0)
- {
- writecheques(maximum);
- /* EasyCODE - */
- --numberofcheques;
- }
- if (remainingvalue>0)
- {
- writecheque(remainingvalue);
- }
- }
- }
- /* EasyCODE ) */
-